package exam2013;

import static org.junit.Assert.*;

import org.junit.Test;

public class SortedLinkedSetTest {

	@Test
	public void abc() throws DuplicateElementException {
		assertEquals("abc", "[a,b,c]", new SortedLinkedSet<String>("a", "b", "c").toString());
	}
	
	@Test(expected=DuplicateElementException.class)
	public void duplicate() throws DuplicateElementException {
		assertEquals("aa", "[a]", new SortedLinkedSet<String>("a", "a").toString());
	}
	
	@Test
	public void yz() throws DuplicateElementException {
		assertEquals("yz", "[y,z]", new SortedLinkedSet<String>("y", "z").toString());
	}
	
	@Test
	public void zy() throws DuplicateElementException {
		assertEquals("zy", "[y,z]", new SortedLinkedSet<String>("z", "y").toString());
	}

}
